04. Gaussian Equation

Gaussian Equation

Here again is the Gaussian probability density function.

\LARGE f(x) = \frac{1}{\sqrt{2\pi\sigma{^2}}}e^{\frac{-(x-\mu)^2}{2\sigma^2}}

Don't let this equation intimidate you! This equation only has three input variables:

  • \large \mu
  • \large \sigma
  • \large x

The symbol \mu represents a population mean. The symbol \sigma is the standard deviation of the distribution, which represents the spread. If you remember from statistics, the mean and standard deviation are constants when dealing with a population. So for a specific population, the only value that varies is x.

Example

Let's make this more concrete. Say you are looking at the probabilities associated with winter temperatures in San Francisco. Assume that the minimum daily temperature follows a Gaussian distribution. This might or might not actually be true if you were to measure winter temperatures experimentally, but for this example, assume that it is true.

Say that on average, the minimum winter temperature in San Francisco is 50 degrees Fahrenheit. In other words, If you measured the minimum temperature every day of winter over all winters ever, the average value would be 50. Let's say the standard deviation is 10 degrees.

Now, substituting the mean and standard deviation into the Gaussian equation gives:

\LARGE f(x) = \frac{1}{\sqrt{2\pi10{^2}}}e^{\frac{-(x-50)^2}{2\times10^2}}

After substituting in the mean and standard deviation into the equation, the equation doesn't look so bad. You could take a range of x values, which in this case represents temperature, and then you could calculate y for each x value.

So, get out your calculator because it's time for a quiz.

Gaussian Probability Density Function

Given that the mean is 50 and the standard deviation is 10, calculate the probability density function value f(x) of the Gaussian distribution. Use the following temperature data: x = [29, 45, 48, 50, 62, 78]

SOLUTION: 0.0044, 0.0352, 0.0391, 0.0399, 0.0194, 0.000792